import { Notification } from 'element-ui'
import router from '@/router'

export const notify = (message = '') => {
  const url = '\n<p style="color: #409eff;cursor: pointer;">点击前往查看。</p>'
  message = message + url
  const notify = Notification({
    title: '消息提示',
    message,
    type: 'info',
    duration: 0,
    dangerouslyUseHTMLString: true,
    onClick: () => {
      router.push({ path: '/notify' })
      notify.close()
    }
  })
}
